import React, { useEffect } from "react";
import { Form, Input, Col } from "antd";
import BaseFormTable from "@/components/BaseFormTable";
import { getTextInfo } from "@/api";
import columns, { dataSource } from "./columns";

const FormTableDemo = () => {
  useEffect(() => {});
  return (
    <React.Fragment>
      <BaseFormTable
        tableOtherConfig={{
          columns,
          dataSource,
        }}
        queryApiAndOtherParams={{
          queryApi: getTextInfo,
          otherParams: {
            showapi_appid: "108178",
            showapi_sign: "198758c24c74470ca34372f2447268e4",
          },
        }}
      >
        <React.Fragment key="form">
          <Col span={8}>
            <Form.Item
              label="活动日期"
              name="userame"
              rules={[{ required: true, message: "Please input " }]}
            >
              <Input />
            </Form.Item>
          </Col>

          <Col span={8}>
            <Form.Item
              label="活动编号"
              name="userne"
              rules={[{ required: true, message: "Please input " }]}
            >
              <Input />
            </Form.Item>
          </Col>
          <Col span={8}>
            <Form.Item
              label="开始日期"
              name="username"
              rules={[{ required: true, message: "Please input " }]}
            >
              <Input />
            </Form.Item>
          </Col>
        </React.Fragment>
      </BaseFormTable>
    </React.Fragment>
  );
};

export default FormTableDemo;
